/* eslint-disable class-methods-use-this */
import {
  get,
} from '@/lin/plugins/axios'

// 我们通过 class 这样的语法糖使模型这个概念更加具象化，其优点：耦合性低、可维护性。
class Finance {
  async getGoodsList(page, limit, info) {
    const res = await get(`v1/finance/goods?page=${page}&limit=${limit}`, info)
    return res
  }

  async getStoreList(page, limit, info) {
    const res = await get(`v1/finance/store?page=${page}&limit=${limit}`, info)
    return res
  }

  async getUserMoneyExcelList(info) {
    const res = await get('v1/finance/excel/user_money', info)
    return res
  }

  async getUserMoneyList(page, limit, info) {
    const res = await get(`v1/finance/user_money?page=${page}&limit=${limit}`, info)
    return res
  }
}

export default new Finance()
